<template>
	<view class="" style="padding-top: 25rpx;background-color: #efefef;" :style="list.length >3 ?'':'height:100vh'">

		<view class="mian" v-for="(item,index) in list" :key="index" @click="jump(item)">
			<image :src='item.img' mode="aspectFill" class="lisimg">
				<view class="dis_f aic jub mt10">
					<view class="oh2 fs30 ">
						{{item.title}}
					</view>
					<view class="c6 fs24">
						{{item.addtime}}
					</view>
				</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: []
			}
		},
		onLoad() {
			this.postconfig()
		},
		methods: {
			jump(item) {
				uni.navigateTo({
					url: '/pagesA/in_text/in_text?type=' + 2 + '&id=' + item.id
				})
			},
			postconfig() {
				let that = this
				that.api.post('index/newslst', {
					type: 0
				}).then(res => {
					console.log(res);
					if (res.code == 200) {

						this.list = res.data
					}


				})
			},
		}
	}
</script>

<style>
	.lisimg {
		width: 100%;
		height: 357rpx;

		border-radius: 5rpx;
	}

	.mian {
		background: #FFFFFF;
		/* width: 100%; */
		padding: 25rpx;
		box-sizing: border-box;

		border-radius: 5rpx;
		margin: 0 20rpx 20rpx 20rpx;
	}
</style>